All Questions
5 questions
0votes
1answer
930views
JavaScript file successfully registered but does not render correctly
I have this page that uses colorbox to popup information about the staff members when the photo is clicked. My page is a child theme of a West and I inserted the following code in the functions.php /...
1vote
2answers
4kviews
When to use add_action when registering/enqueuing scripts
When should you use add_action to enqueue or register a script, vs just using wp_register_script and/or wp_enqueue_script? In other words, both example 1 and example 2 below seem to accomplish the ...
0votes
2answers
62views
Plugin Scripts no loading on options page
I've got this in my main php file, but the scripts aren't loading function class_table_scripts() { wp_register_script( 'JavaScript1', plugins_url('js/wcs.js'), array() ); wp_register_script( '...
27votes
3answers
32kviews
How to enqueue scripts on custom post add/edit pages?
I'm trying to enqueue a JS script only when someone is adding or editing a custom post type I created called "recipes". Currently the script works ok when I do this: if (is_admin()){ ...
4votes
2answers
1kviews
Correct place to register and enqueue scripts
I'm queueing several scripts in my themes Functions.php: if ( ! function_exists('b99_init_scripts') ) : function b99_init_scripts(){ if ( !is_admin()){ wp_deregister_script('...